package com.itheima.d6_singleInstance;

/*
    目标：掌握单例设计模式的写法。
    饿汉式
 */
public class Test1 {
    public static void main(String[] args) {
        Student stu1 = Student.getStudent1();
        Student stu2 = Student.getStudent1();
        Student stu3 = Student.getStudent1();
        System.out.println(stu1);
        System.out.println(stu3);
        System.out.println(stu2);
    }
}
